/**
 * Author : Fengyuan Zhang
 * Date : 2019-1-21
 * Description : Setting
 */
const fs = require("fs");
const path = require('path');


config = {
    mongodb: {
        name: 'GeoTaskServerDB',
        host: '127.0.0.1',
        port: '27017',
    }
}
try{
    ds = fs.readFileSync(path.dirname(process.execPath) + "/config.json");
    config_f = JSON.parse(ds);
    config.mongodb.host = config_f.mongodb.host;
    config.mongodb.port = config_f.mongodb.port;
}
catch(ex){}

module.exports =  {
    port : '8061',
    type : 2, //! 1 - Local network; 2 - Internet
    crypto:{
        algorithm : 'aes-256-cbc',
        key : 'ae3e712c-ccdf-4964-b819-c85770146485'
    },
    mongodb : {
        name: config.mongodb.name,
        host: config.mongodb.host,
        port: config.mongodb.port,
        // host:'172.21.213.105',
        // host:'175.27.137.60',
        // port:'23266',
        // username: 'TASKSERVERROOT',
        // password: 'ogms1qaz2wsx'
    },
    manager:{
       website: 'geomodeling.njnu.edu.cn/managerServer'
       // website: '127.0.0.1:8084'
    },
    dataContainer:{
        // host: '111.229.14.128',
        // port: '8899'
        host: '94.191.49.160',
        port: '8082'
    },
    dataContainerIpAndPort:{
        website: 'geomodeling.njnu.edu.cn/dataTransferServer'
    },

    portal: {
        //website: 'geomodeling.njnu.edu.cn'
        website: '127.0.0.1:8080'
    },
    resourceCenter: {
        website: '127.0.0.1:8090'
    },
    selfIp: ''
};